import mockjs from 'mockjs'
//引入要模拟的数据
import banner from './banner.json'
import floor from './floor.json'
import banner_production from './banner copy.json'
import floor_production from './floor copy.json'

//第一个参数：接口的地址 第二个参数:向这个接口发请求获取到的数据
if (process.env.NODE_ENV == 'production') {
  mockjs.mock('/mock/banner', { code: 200, data: banner_production })
  mockjs.mock('/mock/floor', { code: 200, data: floor_production })
} else {
  mockjs.mock('/mock/banner', { code: 200, data: banner })
  mockjs.mock('/mock/floor', { code: 200, data: floor })
}
